package com.qqtech.qquan.vote.model;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.qqtech.core.common.util.StringUtil;
import com.qqtech.qquan.vote.enums.VoteConst;

@SuppressWarnings("serial")
public class VoteItemVo extends VoteItem {
	private Integer percent;

	/** 是否显示图片 **/
	public boolean getIsShowImg() {
		if (StringUtils.isNotBlank(this.getImg())) {
			return true;
		} else {
			return false;
		}
	}

	public String getPathImg() {
		if (StringUtil.isBlank(this.getImg())) {
			return "";
		}
		return super.getImgHandleDomain() + "" + super.getImg() + VoteConst.IMG_POSTFIX;
	}
	public String getBigPathImg() {
		if (StringUtil.isBlank(this.getImg())) {
			return "";
		}
		return super.getImgHandleDomain() + "" + super.getImg();
	}
	

	public Integer getPercent() {
		return percent;
	}

	public void setPercent(Integer percent) {
		this.percent = percent;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
	}
}